// Convert a string to a float
function myParseFloat(value) {
    // Sanitize input
    var sanitizedValue = value.replace(/[^0-9.]/g, '');
    // Parse as float
    var parsedValue = parseFloat(sanitizedValue);
    // Check for NaN
    return isNaN(parsedValue) ? 0.0 : parsedValue;
}